package com.vcc.core.enumConstant;


import lombok.Getter;

import java.util.Arrays;
import java.util.stream.Collectors;


@Getter
public enum AuthStatusEnum {
    APPROVED("SUCCESS", "授权成功"),
    DECLINED("FAILED", "授权失败"),
    PENDING("PENDING", "等待中");
    private String status;

    private String title;

    AuthStatusEnum(String status, String title) {
        this.status = status;
        this.title = title;
    }


    public static AuthStatusEnum getByStatus(String status) {
        return Arrays.stream(AuthStatusEnum.values()).filter(it -> it.status.equals(status)).collect(Collectors.toList()).get(0);
    }
}
